# -*- coding: utf-8 -*-#
#-------------------------------------------------------------------------------
# 建立者:        黄周云  
# Name:         test03
# Description:  例8.3
# Author:       ASUS
# Date:         2019/3/11
#-------------------------------------------------------------------------------


class MyClass:
    #class块中的语句会立刻执行
    print("MyClass")
    count = 0
    def counter(self):
        self.count += 1
my = MyClass()
my.counter()
print(my.count)
my.counter()
print(my.count)
my.count = "abc"                #将count变量改成字符串类型
print(my.count)
my.name = "Hello"               #向my对象动态添加name变量
print(my.name)



